const ndjson = require('ndjson');

exports.parse =  function()　{ 
    return ndjson.parse();
}

exports.onStringEitherImpl = function(readString) {
  return function (r) {
    return function (cb) {
        return function () {
          r.on("data", function (data) {
              cb(readString(data))();
          });
        };
    };
  };
}